   <!--暂时弃用-->

<template>
   <el-dialog
        :title="testTitle"
        :visible.sync="addDialogVisible"
        width="50%"
        :close-on-click-modal="false"
        @close="addDialogClosed"
      >
        <!-- 详情页面 -->
        <el-form
          :model="particularsForm"
          :rules="particularsFormRules"
          ref="particularsFormRef"
          label-width="70px"
        >
          <el-form-item label="内存" prop="ram">
            <el-input v-model="particularsForm.ram"></el-input>
          </el-form-item>
          <el-form-item label="磁盘" prop="rom">
            <el-input v-model="particularsForm.rom"></el-input>
          </el-form-item>
          <el-form-item label="网络" prop="net">
            <!-- <el-input v-model="particularsForm.net"></el-input> -->
          <!-- <div v-if="Array.isArray(particularsForm.net)"> -->
             <!-- <div v-if="Array.isArray(row.address)">
                            <p v-for="(adr, index) in row.address" :key="index">{{adr}}</p>
                    </div>
                    <span v-else>{{row.address}}</span> -->
          </el-form-item>
          <el-form-item label="cpu" prop="cpu">
            <el-input v-model="particularsForm.cpu"></el-input>
          </el-form-item>
          <el-form-item label="端口" prop="port">
            <el-input v-model="particularsForm.port"></el-input>
          </el-form-item>
        </el-form>
        <el-table-column label="地址" prop="net">
        <template #default=" { row }">
          <div v-if="Array.isArray(row.address)">
                            <p v-for="(adr, index) in row.address" :key="index">{{adr}}</p>
                    </div>
                    <span v-else>{{row.address}}</span>
        </template>
</el-table-column>
        <!-- 底部区 -->
        <span slot="footer" class="dialog-footer">
          <el-button @click="addDialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="save">确 定</el-button>
        </span>
      </el-dialog>
</template>

<script>
export default {
    data(){
        return {
            testTitle:"主机详细信息",
            addDialogVisible:false,
            particularsForm:{},
        }
    },
    methods:{
        open(row){
            
            this.particularsForm = Object.assign({},row)
            this.addDialogVisible = true
        },
    }
}
</script>

<style>
</style>